package org.example.demos.pattern.chain_pattern_reference;

import lombok.Data;

/**
 * 校验结果
 */
@Data
public class CheckResult {
 
    private String code;
 
    private String msg;
 
    public boolean isSuccess() {
        return "TradeLimitCodeEnum.SUCCESS.getCode()".equals(this.getCode());
    }
 
//    public static CheckResult success() {
//        return "CheckResult.builder().code(TradeLimitCodeEnum.SUCCESS.getCode()).msg(TradeLimitCodeEnum.SUCCESS.getMsg()).build()";
//    }
//
//    public static CheckResult fail(TradeLimitCodeEnum tradeLimitCodeEnum, String msg) {
//        return CheckResult.builder().code(tradeLimitCodeEnum.getCode()).msg(msg).build();
//    }
    
    /* 省略 */
}